﻿using System.Collections.Generic;
using System.Linq;

namespace Kernelx.Contexts.Repositories.Core
{

    /// <summary>
    ///
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IModelStore<T>  where T : class, new() 
    { 
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ety"></param>
        void Insert(T ety);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="etys"></param>
        void Insert(IList<T> etys);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="ety"></param>
        IModelTrack<T> Update(T ety);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="ety"></param>
        void PhysicsDelete(T ety);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="etys"></param>
        void PhysicsDelete(IList<T> etys);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        T Find(params object[] ids);


        /// <summary>
        /// 
        /// </summary>
        /// <param name="isTracking"></param>
        /// <returns></returns>
        IQueryable<T> GetQuery(bool isTracking = false);

    } 
}
